import 'package:flutter/material.dart';

class NovelDetailDesc extends StatelessWidget {
  final String? summary;
  final bool? isUnfold;
  final VoidCallback? onPressed;

  const NovelDetailDesc({Key? key, this.summary, this.isUnfold, this.onPressed}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Container(
      child: GestureDetector(
        onTap: onPressed,
        child: Container(
          color: Colors.white,
          padding: EdgeInsets.fromLTRB(15, 15, 15, 15),
          child: Column(children: [
            Text(
              summary!,
              maxLines: isUnfold! ? null : 3,
              style: TextStyle(fontSize: 14),
            ),
          ]),
        ),
      ),
    );;
  }
}
